/** \file gu_util.cpp */

#include "gu_util.h"

#include <cstdio>

#include "GL/glew.h"

namespace gu
{

bool checkGlError_callback(const char* msg, int line, const char* file)
{
    bool result = true;
    GLenum ErrorCheckValue = glGetError();
    if (ErrorCheckValue != GL_NO_ERROR)
    {
        result = false;
        fprintf(
                stderr,
                "%s:%i ERROR: %s, %s\n",file, line, msg,
                gluErrorString(ErrorCheckValue)
        );
    }
    return result;
}

}
